package com.cskaoyan.controller;/*
 *  @Author tsuki
 *  @Date 2021/4/12
 *  @Description
 *
 */

import com.cskaoyan.service.market.CategoryService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/wx/catalog")
public class WxCatalog {

    @Autowired
    CategoryService categoryService;

    @RequestMapping("current")
    public BaseRespVo current(Integer id){
        Map<String,Object> map = categoryService.wxCurrentQuery(id);
        return BaseRespVo.ok(map);
    }

    @RequestMapping("index")
    public BaseRespVo index(){
        Map<String,Object> map = categoryService.wxIndexQuery();
        return BaseRespVo.ok(map);
    }
}
